﻿<sdk:ChildWindow	
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
	xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
	x:Class="FU.Capstones.IMS.Web.Silverlight.Popups.LoginPopup"
	Width="440" Height="320"
    Style="{StaticResource LoginPopupTemplate}"
    >
	<sdk:ChildWindow.OverlayBrush>
		<ImageBrush
            Stretch="Fill" 
            ImageSource="/FU.Capstones.IMS.Web.Silverlight;component/Images/Warehouse3.jpg"/>
	</sdk:ChildWindow.OverlayBrush>
	
	<telerik:RadBusyIndicator 
		BusyContent="Đang kết nối tới máy chủ..." 
		IsBusy="{Binding Path=IsBusy, Mode=OneWay}">
	
		<Grid x:Name="LayoutRoot">
			<Grid.RowDefinitions>
                <RowDefinition Height="75"/>
                <RowDefinition Height="25"/>
				<RowDefinition Height="30" />			
				<RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="*" />
			</Grid.RowDefinitions>
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="*" />
				<ColumnDefinition Width="Auto"/>
				<ColumnDefinition Width="Auto"/>
				<ColumnDefinition Width="*" />
			</Grid.ColumnDefinitions>
		
			<TextBlock 
                Grid.Row="0" Grid.Column="1" 
                Grid.RowSpan="2" Grid.ColumnSpan="2"
                VerticalAlignment="Top"
                HorizontalAlignment="Left"
                Text="SMO" 
                Margin="20 0 2 10"
				FontSize="60" 
                FontWeight="Bold">
				<TextBlock.Foreground>
					<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
						<GradientStop Color="Black" Offset="0"/>
						<GradientStop Color="#FF218CA1" Offset="1"/>
					</LinearGradientBrush>
				</TextBlock.Foreground>
			</TextBlock>
		
			<TextBlock 
                Grid.Row="1" Grid.Column="2" 
                HorizontalAlignment="Left" 
                Text="Storage Management Online" 
                Margin="10 0 0 0"
                VerticalAlignment="Top"
				FontSize="13.333" FontWeight="Bold" 
                Foreground="#FF1C1A78"/>

            <TextBlock
                Grid.Row="2" Grid.Column="2"
                Text="{Binding Path=Message, Mode=OneWay}"
                Style="{StaticResource ErrorMessageTextBlockStyle}"
                Visibility="{Binding Path=MessageVisibility, Mode=OneWay}"
            />

            <TextBlock
				Grid.Row="3" Grid.Column="1"
				Style="{StaticResource TextBlockNormalStyle}"
				Text="{StaticResource UsernameLabelText}"		
			/>				
			<TextBox			
				Grid.Row="3" Grid.Column="2"
				Style="{StaticResource TextBoxNormalStyle}"
				Text="{Binding Path=Account.Username, Mode=TwoWay, ValidatesOnDataErrors=True}"
			
			/>
		
			<TextBlock
				Grid.Row="4" Grid.Column="1"
				Style="{StaticResource TextBlockNormalStyle}"
				Text="{StaticResource PasswordLabelText}"
			/>
				
			<PasswordBox
				Grid.Row="4" Grid.Column="2"			
				Style="{StaticResource PasswordBoxNormalStyle}"
				Password="{Binding Path=Account.Password, Mode=TwoWay, ValidatesOnDataErrors=True}"
			/>
					
			<CheckBox 
                Content="Ghi nhớ đăng nhập" 
                Grid.Column="2" Grid.Row="5"
				Style="{StaticResource CheckBoxNormalStyle}"
				IsChecked="{Binding Path=RememberPassword, Mode=TwoWay}"
			/>
			
            <!--Buttons-->
			<StackPanel
				Orientation="Horizontal"
				HorizontalAlignment="Center" VerticalAlignment="Center"
				Grid.Row="6" Grid.Column="1" Grid.ColumnSpan="2"
				>
				<telerik:RadButton
					Style="{StaticResource ButtonNormalStyle}"
					Content="Đăng nhập"
					Click="DoLogin"				
				/>
		
				<telerik:RadButton
					Style="{StaticResource ButtonNormalStyle}"
					Content="Hủy" Click="DoCancel"
				
				/>
			</StackPanel>					
		</Grid>
	</telerik:RadBusyIndicator>
</sdk:ChildWindow>